package org.webgene.foundation;

import java.util.ArrayList;
import org.apache.log4j.Logger;
import org.webgene.util.URLChecker;
import org.webgene.wrapper.HTTPGetter;

public class Snake {
	private Logger log = Logger.getLogger(Snake.class);
	private boolean isInvalid;
	private String url;
	
	public Snake(String url)
	{
		this.url = url;
		this.isInvalid = new URLChecker().isValidURL(url);
	}
	
	public ArrayList<Link> getListLink(){
		ArrayList<Link> list = new ArrayList<Link>();
		
		return list;
	}
	
	public boolean isInvalidSnake(){ return this.isInvalid; }

	public HTML getHTML() throws Exception{
		HTTPGetter getter = new HTTPGetter();
		HTML html = new HTML(getter.request(this.url));
		return html;
	}
}
